import React, { useEffect, useState } from 'react';
import { getRandomYiyan } from '@/api';
import styles from './index.module.less';
interface Yiyan {
  hitokoto: string;
  from: string;
}
const Footer: React.FC = () => {
  const [yiyan, setYiyan] = useState<Yiyan>();
  useEffect(() => {
    getRandomYiyan().then((res) => {
      setYiyan(res.data.data);
    });
  }, []);
  return (
    <>
      <div className={styles.footer}>
        「 {yiyan?.hitokoto} {yiyan?.from} 」
      </div>
    </>
  );
};

export default Footer;
